// 找不到资源错误
class NotFoundError extends Error{
    constructor(message){
        super(message)
        this.message = message
        this.name = 'NotFoundError'
    }
}
// sequelize操作验证错误
class SequelizeValidateError extends Error{
    constructor(message){
        super(message)
        this.message = message
        this.name = 'SequelizeValidateError'
    }
}
// 请求参数格式错误
class BadRequestError extends Error{
    constructor(message){
        super(message)
        this.message = message
        this.name = 'BadRequestError'
    }
}
// 用户信息错误
class UnauthorizedError extends Error{
    constructor(message){
        super(message)
        this.message = message
        this.name = 'UnauthorizedError'
    }
}
// 用户信息错误
class AlreadyExistsError extends Error{
    constructor(message){
        super(message)
        this.message = message
        this.name = 'AlreadyExistsError'
    }
}
module.exports = {
    NotFoundError,
    BadRequestError,
    UnauthorizedError,
    AlreadyExistsError,
    SequelizeValidateError
}